home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15512 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  843 b 

  1. Path: hobbes.cc.uga.edu!pollux!greear
  2. From: greear@pollux.cs.uga.edu (Ben Greear)
  3. Newsgroups: comp.lang.c++
  4. Subject: overloading ofstream constructor, help needed
  5. Date: 5 Apr 1996 23:02:38 GMT
  6. Organization: University of Georgia, Athens
  7. Message-ID: <4k48qe$o9v@hobbes.cc.uga.edu>
  8. NNTP-Posting-Host: pollux.cs.uga.edu
  9.  
  10.  
  11. I have a string class:  String
  12.  
  13. I would like to be able to get an ofstream type file stream like this:
  14.  
  15. String buf("./my_log_file");
  16.  
  17. ofstream my_ofstream(buf);
  18.  
  19.  
  20. I think this would entail overloading ofstream somehow, and undoubtedly
  21. some other c++ wizardry :)
  22.  
  23.  
  24. if anyone has an example, or advice, I would love to look at it!!
  25.  
  26. Ben Greear                 |  "The meek shall inherit the Earth,
  27. greear@pollux.cs.uga.edu   |   the rest of us are going to the Stars!!
  28. Junior at UGA                        --Bumper Sticker
  29.  
  30.  
  31.  
  32.